export const modalText = `
import React, { useRef, useState } from 'react';
import {  Modal } from '@/components'



const modalDom: React.FC = () => {
  const ModalRef = useRef<any>()
 
  function showModal(callback) {
    // 具体使用看 ant网站
    ModalRef.current.Modal.error({
      title: 'This is an error message',
      content: 'some messages...some messages...',
    })
    callback()
  }
  function showModal2(callback) {
    ModalRef.current.showModal()
    setTimeout(() => {
      callback()
    }, 2000)
  }
  function handleOk(type) {
    ModalRef.current.hide()
  }
  return (
    <div>
     
      <IvButton type="primary" onClick={showModal}>
        出现其他
      </IvButton>
      <IvButton type="primary" onClick={showModal2}>
        出现弹窗
      </IvButton>
      <Modal handleOk={handleOk} ref={ModalRef} title='我是弹窗标题' autoClose={false}>
        内容
      </Modal>
    

    </div>
  )
}

export default modalDom;
`